package com.snow.vpnclient.util;

import android.util.Log;

import java.util.Arrays;
import java.util.stream.Collectors;

/**
 * @author liufq
 * @since 2022-10-25 18:02:05
 */
public class Logger {

    public static final String TAG_START = "ztna_android";

    public static void d(Object... msg) {
        Log.d(TAG_START, Arrays.stream(msg).map(String::valueOf).collect(Collectors.joining(" ")));
    }

    public static void d(String... msg) {
        Log.d(TAG_START, String.join(" ", msg));
    }

    public static void e(String msg) {
        Log.e(TAG_START, msg);
    }

    public static void e(String msg, String... param) {
        Log.e(TAG_START, msg + ", " + Arrays.asList(param));
    }

    public static void e(String msg, Throwable tr) {
        Log.e(TAG_START, msg, tr);
    }
}
